Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PA-6549) Fix warning:undefining the allocator of T_DATA class #860

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

AriaXLi
Copy link
Contributor

@AriaXLi AriaXLi commented Jun 12, 2024

After puppetlabs/puppet#9349 was merged the
warning: undefining the allocator of T_DATA class SWIG::TYPE_p_selabel_handle
error popped up again on RHEL-8 x86_64.

We ran into this previously and thought #620 fixed it completely. This issue was completely fixed in swig 4.2.0+.

This commit patches selinuxswig_ruby_wrap.c with swig/swig@aa21014 and is applied after the patch from #620 since the fix in swig/swig@aa21014 came after.

After puppetlabs/puppet#9349 was merged the
   warning: undefining the allocator of T_DATA class SWIG::TYPE_p_selabel_handle
error popped up again on RHEL-8 x86_64.

We ran into this previously and thought puppetlabs#620 fixed it
completely. This issue was completely fixed in swig 4.2.0+.

This commit patches selinuxswig_ruby_wrap.c with swig/swig@aa21014 and is
applied after the patch from puppetlabs#620 since the fix in
swig/swig@aa21014 came after.
@AriaXLi AriaXLi requested review from a team as code owners June 12, 2024 17:18
@AriaXLi
Copy link
Contributor Author

AriaXLi commented Jun 12, 2024

Successfully built in vanagon-generic-builder with el-9-x86_64 el-8-x86_64 debian-11-aarch64 debian-12-amd64 as BUILD_TARGETS to ensure the existing patch is correctly applied and only applied for platforms that use Ruby 3+: https://jenkins-platform.delivery.puppetlabs.net/view/vanagon-generic-builder/job/platform_vanagon-generic-builder_vanagon-packaging-ship-repos_generic-builder/1578/

@AriaXLi
Copy link
Contributor Author

AriaXLi commented Jun 12, 2024

I also successfully built locally:

$ bundle exec vanagon build agent-runtime-main el-8-x86_64 --preserve always
...
Warning: Permanently added 'very-stint.delivery.puppetlabs.net' (ED25519) to the list of known hosts.

[root@very-stint libselinux-2.9]# /opt/puppetlabs/puppet/bin/ruby -e 'puts require "selinux"; Selinux.selabel_open(0, nil, 0)'
true

I also checked selinuxswig_ruby_wrap.c to confirm that the patch is correctly applied for RHEL8

@joshcooper joshcooper merged commit db00b4c into puppetlabs:master Jun 12, 2024
3 checks passed
AriaXLi added a commit to AriaXLi/puppet-runtime that referenced this pull request Jun 13, 2024
This reverts commit db00b4c, reversing
changes made to 2f23346.
cthorn42 added a commit that referenced this pull request Jun 13, 2024
Revert "Merge pull request #860 from AriaXLi/PA-6549"
@joshcooper joshcooper added the skip changelog Will be excluded from changelog label Jun 21, 2024
imaqsood pushed a commit to imaqsood/puppet-runtime that referenced this pull request Aug 12, 2024
This reverts commit db00b4c, reversing
changes made to 2f23346.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog Will be excluded from changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants